var procID;
function hideMenu(){
	if( !event || event.type != 'keypress' || event.keyCode == 27)try{top.frmContent.elMenu.hide()}catch(e){}
}
function resize(){
	this.frameElement.parentElement.rows = document.body.scrollHeight+",*,0";
}
function showMainSubMenu(menu,btn){//debugger;
//	if( showMainSubMenu.caller.caller &&
//			!showMainSubMenu.caller.caller.toString().match(/showAround/i) )
//		showAround = function(){};
	clearTimeout(procID);
	if( typeof(btn) == "string" )return top.frmContent.showSubMenuItem(-1,"link",btn);
	top.frmContent.scrollTo(0,0);
var el = event.srcElement;
var menu = top.frmContent[menu];
	if( menu && !menu.tagName && menu.length )return alert("Multiple menus for one id.");
	try{
			top.frmContent.elMenu.hide();
			initButtons(btn);
	}catch(e){}
	top.frmContent.elMenu = menu;
	try{
		menu.menuShow(true,getLeftPos(btn),top.frmContent.document.body.scrollTop||0);
	}catch(e){}
//	top.frmContent.setTimeout(menu.uniqueID+".scrollIntoView()",100);
}
function getLeftPos(e){
  if( !e)return 0;
  var n = e.offsetLeft + getLeftPos(e.offsetParent);
  return n;
}
